package com.ms3ds.deviceData.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ms3ds.common.core.annotation.Excel;

/**
 * 传感器数据展示对象 VO
 * 包含传感器数据以及关联的传感器信息
 * 
 * @author ms3ds
 */
public class SensorDataVO
{
    /** 主键ID */
    @Excel(name = "主键ID")
    private Long id;

    /** 传感器id */
    @Excel(name = "传感器ID")
    private Long sensorId;

    /** 传感器名称 (来自sensor表) */
    @Excel(name = "传感器名称")
    private String sensorName;

    /** 单位 (来自sensor表) */
    @Excel(name = "单位")
    private String unit;

    /** 设备名称 (来自device表) */
    @Excel(name = "设备名称")
    private String deviceName;

    /** 数值 */
    @Excel(name = "数值")
    private Double data;

    /** 时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date time;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSensorId() {
        return sensorId;
    }

    public void setSensorId(Long sensorId) {
        this.sensorId = sensorId;
    }

    public String getSensorName() {
        return sensorName;
    }

    public void setSensorName(String sensorName) {
        this.sensorName = sensorName;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public Double getData() {
        return data;
    }

    public void setData(Double data) {
        this.data = data;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "SensorDataVO{" +
                "id=" + id +
                ", sensorId=" + sensorId +
                ", sensorName='" + sensorName + '\'' +
                ", unit='" + unit + '\'' +
                ", deviceName='" + deviceName + '\'' +
                ", data=" + data +
                ", time=" + time +
                '}';
    }
} 